package com.hl.springboot4.controller;

import com.hl.springboot4.entity.ArticleType;
import com.hl.springboot4.service.ArticleTypeService;
import com.hl.springboot4.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RestControllerAdvice;

import java.util.List;

/**
 * @ClassName ArticleTypeController
 * @Description TODO
 * @Author libowen
 * @Date 2025年03月06日 17:48
 * @Version 1.0
 */
@RestController
@RequestMapping("articleType")
public class ArticleTypeController {

    @Autowired
    private ArticleTypeService articleTypeService;

    @RequestMapping("findAll")
    public R findAll(){
        List<ArticleType> list = articleTypeService.findAll();
        return R.ok(list);
    }

}
